Skip to content

user model lam lai#100

Open
endiduowng wants to merge 1 commit intohellovietnam93:nguyen_van_duong_20140887from
endiduowng:basic_user
Open

user model lam lai#100
endiduowng wants to merge 1 commit intohellovietnam93:nguyen_van_duong_20140887from
endiduowng:basic_user

Conversation

@endiduowng
Copy link

No description provided.

Gemfile Outdated
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

gem 'bootstrap-sass', '3.3.6'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sử dụng nháy kép nhé

Gemfile Outdated
@@ -21,6 +21,10 @@ gem 'coffee-rails', '~> 4.2'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

xóa hết comment ở đây

Gemfile Outdated

gem 'bootstrap-sass', '3.3.6'

gem 'bcrypt', '3.1.11'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 dấu cashc sau dấu ,

@@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

xóa file này đi nhé

line-height: 1.7em;
}


Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

xóa dòng này đi nhé

@@ -0,0 +1,2 @@
module StaticPagesHelper
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

xóa file này đi

uniqueness: { case_sensitive: false }
has_secure_password
validates :password, presence: true, length: { minimum: 5 }
end No newline at end of file
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thiếu end file

@@ -1,2 +1,10 @@
class User < ApplicationRecord
end
before_save { email.downcase! }
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

xóa cashc trước } và sau {

validates :name, presence: true, length: { maximum: 50 }
VALID_EMAIL_REGEX = /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i
validates :email, presence: true, length: { maximum: 255 },
format: { with: VALID_EMAIL_REGEX },
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ident

@@ -0,0 +1,4 @@
<%= csrf_meta_tags %>
<%= stylesheet_link_tag 'application', media: 'all',
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ident + nháy kép + 1 dấu cashc để ngăn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments